//#version 300 es
uniform vec3 aNormal;
uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;

attribute vec3 posAttr;
attribute vec3 colAttr;
attribute vec2 a_texcoord;

varying vec2 v_texcoord;
varying vec3 col;
varying vec3 Normal;
varying vec3 FragPos;

//! [0]
void main()
{
    gl_Position = projection * view * model * vec4(posAttr, 1.0);
    FragPos = vec3(model * vec4(posAttr, 1.0));
    v_texcoord = a_texcoord;
    col = colAttr;
    Normal = aNormal;

//    Normal = mat3(transpose(inversesqrt(model))) * aNormal;
}
//! [0]
